package rs.fon.is.music.main;


import java.net.URL;
import java.util.LinkedList;


import rs.fon.is.music.domain.MusicGroup;
import rs.fon.is.music.parser.EventParser;
import rs.fon.is.music.parser.LastFMParser;
import rs.fon.is.music.parser.MusicGroupParser;
import rs.fon.is.music.persistence.DataModelManager;
import rs.fon.is.music.services.MusicGroupService;
import rs.fon.is.music.services.Queries;


public class Main {

	public static void main(String[] args) {
		
		LastFMParser parser = new LastFMParser();
		
		try {		
			//parser.parse("http://www.last.fm/music");
			
			//parser.parseCategory("http://www.last.fm/music/+tag/acoustic");
			
			EventParser parserE = new EventParser();
			//parserE.parseEvents("http://www.last.fm/music/The+Beatles");
					
			MusicGroupParser parser1 = new MusicGroupParser();
			//parser1.parse("http://www.last.fm/music/Atoms+for+Peace");
			
			//DataModelManager.getInstance().printOut();
			//DataModelManager.getInstance().write("MusicGroups.rdf", "RDF/XML-ABBREV");
			//DataModelManager.getInstance().closeDataModel();
			
			LinkedList<String> tags = new LinkedList<String>();
			tags.add("rock");
			tags.add("acoustic");
			//tags.add("albums i own");
			//LinkedList<String> groups = new Queries().getGroups(10, 0, 1000, 2013, 0, 1000000000, 0, 1000000000, 0, tags);
			LinkedList<String> groups = new Queries().getGroups(10, 0, -1, 2013, -1, -1, -1, -1, -1, tags);
			//LinkedList<String> groups = new Queries().getGroups(-1, -1, -1, -1, -1, -1, -1, -1, -1, new LinkedList<String>());
			System.out.println("broj grupa ........... " + groups.size());
			for ( String string : groups) {
				System.out.println(string);
				//MusicGroup group = (MusicGroup) DataModelManager.getInstance().load(string);
				//System.out.println(group);
			}
			
			
			
			
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
